<template>
  <div class="22">
    <!-- <p>原始字符串: {{ message }}</p> -->
    <p>计算后反转字符串: {{ reversedMessage }}</p>
    <div id="dom">{{ num }}</div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      message: 2,
      num: 333,
    }
  },

  methods: {},
  created() {
    console.log(this)
    this.num = 111
  },

  mounted() {
    //
    // this.num = 222
  },

  computed: {
    // 计算属性的 getter
    reversedMessage: function () {
      // `this` 指向 vm 实例
      return this.message * 2
    },
  },
  watch: {},
}
</script>
<style lang="scss" scoped></style>
